home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Languguage OS 2
/
Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO
/
language
/
osmall
/
typeinf
/
readme
< prev
Wrap
Text File
|
1994-10-24
|
7KB
|
245 lines
O'SMALL TYPE INFERENCER Version 0.24 March 1994
Andreas V. Hense
Universitaet des Saarlandes
Fachbereich 14 - Informatik
Postfach 15 1150
D - 66041 Saarbruecken
e-mail: hense@cs.uni-sb.de
O'small is an object-oriented programming language developed at the
Universitaet des Saarlandes. The type inferencer is now available by
anonymous ftp in addition to an interpreter and a compiler.
O'small is mainly suited for academic purposes. The language itself
can be MODIFIED because the source code of the type inferencer and the
specifications for the parser and scanner generators are available.
Using these generators you can make experiments for your own research
in statical analysis of object-oriented languages and questions related
to language design.
----------------------------------------------
O'SMALL TYPE INFERENCER COPYRIGHT NOTICE, LICENSE AND DISCLAIMER.
Copyright 1994 by Andreas V. Hense
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both the copyright notice and this permission notice and warranty
disclaimer appear in supporting documentation.
The author disclaims all warranties with regard to this software, including
all implied warranties of merchantability and fitness. In no event
shall the author be liable for any special, indirect or consequential
damages or any damages whatsoever resulting from loss of use, data or
profits, whether in an action of contract, negligence or other
tortious action, arising out of or in connection with the use or
performance of this software.
----------------------------------------------
How to obtain the O'SMALL TYPE INFERENCER
-----------------------------------------
Send comments and bug reports to: hense@cs.uni-sb.de
The means of distributing the type inferencer is anonymous internet
ftp. The following table gives the ftp connection information.
Host: Net Address: Directory:
-------------------------------------------------------------
cs.uni-sb.de 134.96.7.254 /pub/osmall/typeInf
The directory /pub/osmall/typeInf contains this README file and the
compressed tar file osmTI024.tar.Z.
***************************************************************************
NOTE: Ftp should be put into binary mode before transferring the compressed
tar file.
***************************************************************************
Here is a sample dialog:
ftp
ftp> open cs.uni-sb.de
Name: anonymous
Password: <your name>
ftp> binary
ftp> cd /pub/osmall/typeInf
ftp> get README
ftp> get osmTI024.tar.Z
ftp> close
ftp> quit
After the files are transferred they should be uncompressed
and then extracted using tar into a directory called (e.g.) typeInf.
For example:
mkdir typeInf
mv osmTI024.tar.Z typeInf
cd typeInf
uncompress -c osmTI024.tar.Z | tar xf -
Running under SUN OS 4.1.x
--------------------------
The O'small Type Inferencer is invoked with
> infer <filename>
If you omit the filename it will prompt you for one. The file should be an
O'small program. O'small programs are kept in files with the extension
.osm (e.g.: integer.osm). At the prompt
Please enter filename of O'small source
>
simply fill in the file name without the extension (e.g.: `integer').
Running under other operating systems and recompilation
-------------------------------------------------------
This software is written in Caml Light [LW93,WL93]. Caml Light is available
by anonymous FTP:
Host: ftp.inria.fr (Internet address 192.93.2.54)
Login name: anonymous
Password: your e-mail address
Directory: lang/caml-light
Files: depending on your hardware
The main advantage of Caml Light is its economical use of resources. It runs
on all kind of hardware platforms: Unix, MacIntosh, PC, Atari. The hardware
does not have to be very powerful. E.g., the O'small Type Inferencer has
been developed on a 386-SX with 16MHz and 2MB of main memory.
To compile and install the O'small Type Inferencer, be sure that you have
Caml Light properly installed on your machine. Then simply type
> make
in the directory osmall. If make complains check the file `makefile'. Your
version of make may be incompatible with ordinary UNIX make.
If you intend to play with the system or enhance it (e.g. make it more
efficient), you will find the command
> make sig
interesting. This command will result in a series of compilations creating
a file `sig' that contains the complete interface information of the system.
If for some module there exists an .mli file this file will not be
overwritten but will be appended to the file `sig'.
The lexer and parser are generated by camllex and camlyacc.
The concrete syntax of O'small can be gathered from the O'small example
programs in the directory osmProgs. Alternatively, you might like to read
the files osmlex.mll and osmpar.mly for a complete specification.
O'small's syntax is now more flexible than described in [Hen91g].
Running O'small Programs
------------------------
Although programs can be type checked without ever being run, here is the
location of the O'small compiler for all those who are curious what their
programs actually do:
Host: Net Address: Directory:
-------------------------------------------------------------
cs.uni-sb.de 134.96.7.254 /pub/osmall/machine
The directory /pub/osmall/machine contains this README file and the
compressed tar file oma.1.00.tar.Z. The compiler is described in [BFHW94].
O'small Example Programs
------------------------
Some of the example programs in this directory are refused by the type
checker. These programs serve the purpose of demonstrating the limitations
of the approach.
The type inference may take a LONG time. Therefore, at each series of
resolution steps, a dot is printed on the screen. The types of variables
are printed each time they are looked up in the directory. Before such
a lookup the system of equations is brought into normal form. Thus, an
eventual type clash can be localized to be after the last right-hand side
occurrence of a let bound variable.
Bugs
----
The type checker is a one to one implementation of a declarative
algorithm described in [Hen94]. It has many inefficiencies that make
it hard to run -- even on a fast machine. It should be run on small O'small
programs only.
References
----------
[BFHW94] C. Boeschen, C. Fecht, A. V. Hense, R. Wilhelm
An Abstract Machine for an Object-Oriented Language with
Top-Level Classes,
Universitaet des Saarlandes, Fachbereich 14,
D-66123 Saarbruecken,
A 02/94, March 1994
[Hen91g] Andreas V. Hense
An O'small Interpreter Based on Denotational Semantics,
Universitaet des Saarlandes, Fachbereich 14,
D-66123 Saarbruecken,
A 07/91, November 1991
[Hen94] Andreas V. Hense
Polymorphic Type Inference for Object-Oriented Programming
Languages,
Universitaet des Saarlandes, Fachbereich 14,
D-66123 Saarbruecken,
1994, forthcoming
[LW93] X. Leroy, P. Weis
Manuel de reference du langage Caml,
InterEditions,
Paris 1993
[WL93] P. Weis, X. Leroy
Le langage Caml,
InterEditions,
Paris 1993